<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>某科技有限公司1 - 人才招聘系统</title>
    <link rel="stylesheet" th:href="@{/styles/comapply2.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/styles/css.css}" type="text/css"/>
    <script th:src="@{/js/jquery-3.7.1.min.js}"></script>
    <script th:src="@{/js/http.js}"></script>
    <script>
        function showJob(id) {
            localStorage.setItem("job_id", id)
            location.href = "/jobView"
        }

        $(function () {
            postAjax({
                url: "user/enterprise/" + localStorage.getItem("ent_id")
            }, res => {
                let ent_info = res.data
                $("#ent_name").text(ent_info.name)
                $("#ent_industry").after(ent_info.industry)
                $("#ent_logo").attr("src", ent_info.logo, "alt", ent_info.name)
                $("#ent_scale").after(ent_info.scale)
                $("#ent_type").after(ent_info.type)
                $("#ent_address").text(ent_info.address)
                $("ent_description").text(ent_info.description)
                console.log(res)
            })

            $.ajax({
                url: "http://localhost:10010/job/getByEntId",
                type: 'GET',
                headers: {Authorization: localStorage.getItem("token")},
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: {
                    id: localStorage.getItem("ent_id")
                },
                success: res => {
                    let jobs = res.data
                    $("#sum_job").text(jobs.length)
                    jobs.forEach(job => {
                        let pub_time = job.pubTime.split(" ")[0]
                        let job_template = `
                        <div class="firm_post">
                            <div class="com_details_com_otherjob_l">
                                <div class="com_details_com_otherjob_name">
                                    <a href="javascript:void(0)" target="_blank" class="" onclick="showJob(${job.id})">${job.name}</a></div>
                                <div class="com_details_com_otherjob_info">
                                    3年以上经验
                                    <span class="com_details_line">|</span>
                                    大专学历
                                </div>
                            </div>
                            <div class="com_details_com_otherjob_c">
                                <div class="com_details_com_otherjob_xz">${job.minWage}-${job.maxWage}</div>
                                <div class="com_details_com_otherjob_city">上海</div>
                            </div>
                            <div class="com_details_com_otherjob_r">
                                <div class="com_details_com_otherjob_time">${pub_time}</div>
                                <a href="javascript:void(0)" target="_blank" class="com_details_com_otherjob_sq" onclick="showJob(${job.id})">申请</a>
                            </div>
                        </div>

                        `

                        $("#company_job_list").append(job_template)
                    })
                    console.log(res)
                }
            })

            //查询关注状态
            postAjax({
                url: "user/followStatus?ent_id=" + localStorage.getItem("ent_id"),
            }, res => {
                if (res.code === 200) {
                    $("#atn_1").text("已关注")
                } else {
                    $("#atn_1").text("关注")
                }
            })

            //关注企业
            $("#atn_1").click(() => {
                postAjax({
                    url: "user/follow?ent_id=" + localStorage.getItem("ent_id"),
                }, res => {
                    console.log(res)
                    location.reload()
                })
            })


        })
    </script>
</head>

<body class="companyshowbg">
<div class="hp_head hp_head_box">
    <div class="w1200">
        <div class="hp_head_ft fl">
            <div class="phpyun_logo fl">
                <a th:href="@{/}" title="人才招聘系统最新招聘求职信息">
                    <img th:src="@{/images/logo.png}" alt="人才招聘系统"/>
                </a>
            </div>
        </div>
        <div class="yun_header_nav_box">
            <ul>
                <li class="">
                    <a href="" class="png"> 首页 </a>
                    <i class="yun_new_headernav_list_line"></i>
                </li>
                <li class="">
                    <a href="" class="png"> 找工作 </a>
                    <i class="yun_new_headernav_list_line"></i>
                </li>
                <li class="">
                    <a href="" class="png"> 找人才 </a>
                    <i class="yun_new_headernav_list_line"></i>
                </li>
                <li class="">
                    <a href="" class="png"> 找企业 </a>
                    <i class="yun_new_headernav_list_line"></i>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="com_details_top">
    <div class="w1200">
        <div class="com_details_current">您当前的位置：<a href="h">首页</a> >
            <a href="">企业列表</a> >
            <span><a href="">企业详情</a></span>
        </div>
        <div class="com_details_top_c">
            <div class="com_details_info_box">
                <div class="com_details_logo">
                    <a href=""><img src="" width="140" height="140" alt="某科技有限公司1" id="ent_logo"/></a>
                </div>
                <h1 class="com_details_name" style="overflow: hidden; position: relative; max-width: 660px;">
                    <a href="" id="ent_name"></a>
                    <img src="" width="18" height="18" title="会员等级"/></h1>
                <div class="com_details_info">
                    上海 - 上海
                    <span class="com_details_line" id="ent_industry">|</span>
                    <span class="com_details_line" id="ent_type">|</span>
                    <span class="com_details_line" id="ent_scale">|</span>
                </div>

                <div class="com_details_data_box">
                    <div class="com_details_data_box_c">
                        <div class="com_details_data">
                            <div class="com_details_data_n" id="sum_job"></div>
                            <div class="com_details_dataname">在招职位</div>
                            <i class="com_details_data_line"></i>
                        </div>
                        <div class="com_details_data">
                            <div class="com_details_data_n">1</div>
                            <div class="com_details_dataname">共邀面试</div>
                            <i class="com_details_data_line"></i>
                        </div>
                        <div class="com_details_data">
                            <div class="com_details_data_n">100%</div>
                            <div class="com_details_dataname"> 简历处理率</div>
                            <i class="com_details_data_line"></i>
                        </div>
                        <div class="com_details_data">
                            <div class="com_details_data_n">
                                2025-06-21
                            </div>
                            <div class="com_details_dataname"> 最近登录时间</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="com_details_opt">
                <div class="com_details_opt_fxbox">
                    <a href="javascript:void(0)" id='atn_1' class="com_details_opt_gz">关注</a>
                </div>
                <div id="status_div" style="display:none; width:350px;">
                    <div id="claimmsg"></div>
                    <div class="admin_qx_bth" style="text-align:center;padding:10px;border-radius:20px;">
                        <input type="button" class="admin_examine_bth_qx"
                               style="width:70px;height:29px;color:#fff;border:none;font-size:14px;border-radius:3px;background:#f60;"
                               value='关闭'/>
                    </div>
                </div>
                <div class="com_details_opt_fxbox"><a href="javascript:void(0);" class="com_details_opt_hb"
                                                      rel="nofollow">海报</a></div>

                <div class="com_details_opt_fxbox">
                    <a href="javascript:void(0);" rel="nofollow" class="com_details_opt_fx">分享</a>
                    <div class="comapply_sq_r_cy none" id="getwapurl">
                        <div class="comapply_sq_r_cont">
                            <div class="comapply_sq_r_tipa"> 微信扫一扫：分享</div>
                            <img src="" width="130" height="130"/>
                            <div class="comapply_sq_r_tipsm"> ↑微信扫上方二维码↑<br>便可将本文分享至朋友圈</div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="w1200">
    <div class="com_details_left">
        <div class="com_show_leftbox none" id="companybusiness" data-slide='1'>
            <div class="com_details_tit">
                <span class="com_details_tit_s">工商信息</span>
                <i class="com_details_tit_line yun_bg_color"></i>
            </div>
            <div class="com_show_leftcont">
                <!-- 天眼查 start-->
                <div class="business none" id="businessInfo">
                    <div class="businessInfo">
                        <ul class="basicMsgList clearfix">
                            <li>
                                <div class="clearfix"><span>统一社会信用代码：</span><em id="creditCode"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>成立日期：</span><em id="estiblishTime"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>组织机构代码：</span><em id="orgNumber"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>经营期限：</span><em id="Time"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>企业类型：</span><em id="companyOrgType"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>登记机关：</span><em id="regInstitute"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>经营状态：</span><em id="regStatus"></em></div>
                            </li>
                            <li>
                                <div class="clearfix"><span>注册资本：</span><em id="regCapital"></em></div>
                            </li>
                        </ul>
                        <dl class="basicMsgList">
                            <dt>注册地址：</dt>
                            <dd id="regLocation"></dd>
                        </dl>
                        <dl class="basicMsgList mt20">
                            <dt>经营范围：</dt>
                            <dd id="businessScope"></dd>
                        </dl>
                        <div class="qxb clearfix">
                            <div class="qxb_tg">
                                <span>以上内容由</span>
                                <div class="hxb"><a href="" class="tianyancha" id="tianyancha" target='_blank'></a>
                                </div>
                                <span>提供</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 天眼查 end-->
            </div>
        </div>

        <div class="com_show_leftbox">
            <div class="com_details_tit">
                <span class="com_details_tit_s">公司简介</span>
                <i class="com_details_tit_line yun_bg_color"></i>
            </div>
            <div class="clear"></div>
            <div class="com_show_leftcont">
                <div class="con_show_introduction">
                    <div style="width:100%;height:auto; overflow:hidden" id="com_content" class="company_img_auto"><p id="ent_description">
                        </p></div>
                    <div class="company_show_more none"><a href="javascript:;">查看更多</a></div>
                </div>
            </div>
        </div>
        <!-- 公司职位 start -->
        <div class="com_show_leftbox" id="job">
            <div class="com_details_tit"><span class="com_details_tit_s">招聘职位</span>
                <i class="com_details_tit_line yun_bg_color"></i>
            </div>
            <div class="com_show_leftcont">
                <div class="comshow_job" id="company_job_list">
                </div>
            </div>
        </div>
    </div>
    <div class="com_details_right">
        <div class="com_details_rightbox">
            <div class="com_details_tit"><span class="com_details_tit_s">公司地址</span>
                <i class="com_details_tit_line yun_bg_color"></i>
            </div>
            <div class="com_details_tel_me">
                <div class="" id="ent_address"></div>
            </div>
        </div>
        <div class="com_details_rightbox">
            <div class="com_details_tit"><span class="com_details_tit_s">公司问答</span><i
                    class="com_details_tit_line yun_bg_color"></i></div>
            <!--有提问前-->
            <div class="job_details_comask_p">有疑问？快来问问吧</div>
            <div class="job_details_comask_bth">
                <a href="javascript:;" class="job_details_comask_bth_a">我要提问</a>
            </div>
            <!--提问 end-->
        </div>
    </div>
</div>
<div class="hp_foot fl" th:insert="~{/commons/footer}"></div>
</body>
</html>